import React, { memo, Suspense } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom'
function App() {
  return <div>
    <BrowserRouter >
      <Suspense fallback={<div>loading....</div>}>
        <Switch>
          <Route path='/sign' component={React.lazy(() => import('./pages/login/login'))}></Route>
          <Route path='/login' component={React.lazy(() => import('./pages/login/login'))}></Route>
          <Route path='/' component={React.lazy(() => import('./layout'))}></Route>
        </Switch>
      </Suspense>
    </BrowserRouter>
  </div>;
}

export default memo(App);
